package client;

import java.rmi.Remote;

public interface ICallbackHandler extends Remote {
	/**
	 * This remote method is invoked by a callback server to make a callback to an client which implements this interface.
	 * @param message a string containing information for the client to process upon being called back.
	 * @return Notification message
	 * @throws java.rmi.RemoteException RemoteException instance
	 */
	String notifyMe(String message) 
		      throws java.rmi.RemoteException;
	
	/**
	 * Updates a given cell value
	 * @param abscissa Cell abscissa
	 * @param ordinate Cell ordinate
	 * @param value Cell value
	 * @return value Value
	 * @throws java.rmi.RemoteException RemoteException instance
	 */
	String updateCellValue(int abscissa, int ordinate, String value)
			throws java.rmi.RemoteException;
	
	/**
	 * Locks a cell ordered by the server
	 * @param abscissa Cell abscissa
	 * @param ordinate Cell ordinate
	 * @return True in case of success, otherwise returns false
	 * @throws java.rmi.RemoteException RemoteException instance
	 */
	boolean lockCell(int abscissa, int ordinate)
			throws java.rmi.RemoteException;
}
